package com.mashang.stuManSystem.mapping;

import com.mashang.stuManSystem.entity.Student;
import com.mashang.stuManSystem.entity.vo.StudentVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface StudentMapping {
    // INSTANCE理解为实现了StudentMapping接口的类对象
    // 基于StudentMapping去创建一个类StudentMappingImpl
    // 使用StudentMappingImpl类去创建对象
    StudentMapping INSTANCE = Mappers.<StudentMapping>getMapper(StudentMapping.class);

    // 传入student，得到studentVo
    @Mappings({

    })
    StudentVo toStudentVo(Student student);

    List<StudentVo> toStudentVoList(List<Student> studentList);
}
